{% extends "base.html" %}
{% block feeds %}<link rel="alternate" href="/feeds/tag/{{ object.slug }}/" type="application/atom+xml" title="Feed of snippets tagged with '{{ object.name }}'" />{% endblock %}
{% block title %}Tag "{{ object.name }}"{% endblock %}

{% block content_header %}Tag "{{ object.name }}"{% endblock %}

{% block main_content %}
{% if object_list %}
<ul>
{% for snippet in object_list %}
<li><a href="{{ snippet.get_absolute_url }}">{{ snippet.title }}</a> (<a href="{{ snippet.language.get_absolute_url }}">{{ snippet.language.name }}</a>) by <a href="/users/{{ snippet.author.username }}/">{{ snippet.author.username }}</a> {{ snippet.pub_date|timesince }} ago</li>
{% endfor %}
</ul>

<p class="pagination">{% if has_previous %}<a href="?page={{ previous }}">&lt; Previous {{ results_per_page }}</a>{% endif %}&nbsp;&nbsp;{% if has_next %}<a href="?page={{ next }}">Next {{ results_per_page }} &gt;</a>{% endif %}</p>
{% else %}
<p>No snippets are tagged with "{{ object.name }}" yet.</p>
{% endif %}

{% endblock %}

{% block sidebar %}
<p>{{ hits }} snippet{{ hits|pluralize }} {% ifequal hits 1 %}is{% else %}are{% endifequal %} tagged with "{{ object.name }}":</p>

<p><a rel="alternate" href="/feeds/tag/{{ object.slug }}/" type="application/atom+xml"><img src="http://media.djangosnippets.org/img/feed-icon-10x10.png" alt="" /> Feed of snippets tagged with '{{ object.slug }}'</a></p>
{% endblock %}